-- GENERATED SPELL FOR [Scarlet Worker] --


function spell0_1883(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(9791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1883', 20258, 1)
end

function spell1_1883(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1883', 30315, 1)
end

function Sorts_1883(pUnit, Event)
local choix_sorts_1883 = math.random(0, 1)
if choix_sorts_1883 == 0 then
pUnit:RegisterEvent('spell0_1883', 1, 1)
end
if choix_sorts_1883 == 1 then
pUnit:RegisterEvent('spell1_1883', 1, 1)
end
end

function mob1883_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1883', math.random(1500, 3000), 1)
end

function mob1883_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1883_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1883_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1883, 1, 'mob1883_Action')
RegisterUnitEvent(1883, 2, 'mob1883_Leave')
RegisterUnitEvent(1883, 3, 'mob1883_Kill')
RegisterUnitEvent(1883, 4, 'mob1883_Die')
